# vowels列表.1
vowels = ['a','e','i','o','u']
word = "Milliways"
for letter in word:
    if letter in vowels:
        print(letter)

# vowels列表.2
vowels = ['a','e','i','o','u']
word = "Milliways"
found = []
for letter in word:
    if letter in vowels:
        if letter not in found:
            found.append(letter)
for vowel in found:
        print(vowel)

# vowels列表.3
vowels = ['a','e','i','o','u']
word = input("请输入任意单词来检测元音：")
found = []
for letter in word:
    if letter in vowels:
        if letter not in found:
            found.append(letter)
for vowel in found:
    print(vowel)

#panic
phrase = "Don't panic!"
plist = list(phrase)
print(phrase)
print(plist)
for i in range (4):
    plist.pop()
plist.pop(0)
plist.remove("'")
plist.extend([plist.pop(),plist.pop()])
plist.insert(2,plist.pop(3))
new_pharse = ''.join(plist)
print(plist)
print(new_pharse)

#marvin1
paranoid_android = "Marvin"
letter = list(paranoid_android)
for char in letters:
    print('\t', char)

#marvin2
paranoid_android = "Marvin, the Paranoid Android"
letters = list(paranoid_android)
for char in letters[:6]:
    print('\t', char)
print()
for char in letters[-7:]:
    print('\t'*2, char)
print()
for char in letters[12:20]:
    print('\t'*3, char)